<?php $this->render("header.php");?>
<div class="list_box">
   <div class="list_bor">
    <div class="site_nav w_980">
        Position：<a href="<?php echo $this->baseUrl;?>/" title="Home">Home</a> &gt;
        <?php if (!empty($this->type) && !empty($this->onetypename)) print <<<EOT
         <a href="{$this->onetypeurl}" title="{$this->onetypename}">{$this->onetypename}</a> &gt;
EOT;
?>
<span class="c_ora_red"><?php echo $this->typename;?></span>
    </div>
	<div class="w_986">
        <div class="list_sider f_l">
        	<h2 class="h2_title list_plate_bg f_family f_normal"><span class="more"></span><?php if (!empty($this->onetypename)) echo $this->onetypename; else echo $this->typename;?></h2>
            <div class="content list_plate_bg">
            	<ul class="list_sid_nav">
            	<?php 
            	if (is_array($this->types))
            	foreach($this->types as $v){
            	$name = $v['name'];
            	$v_url = $this->url($this->baseUrl, "news", "list", "cid=" . $v['id']);
            	if ($this->cid==$v['id'])
            		$selected = ' class="selected" ';
            	else
            		$selected = "";
            	print <<<EOT
                	<li><a $selected href="$v_url" title="$name"><i class="icon_a icon_all"></i>$name</a></li>
EOT;
}?>
                </ul>
            	<div class="clear"></div>
            </div>
            <div class="list_sider_bot list_plate_bg"></div>
        </div>
        <div class="list_main f_r">
        	<div class="list_plate_bg main_top"></div>
            <div class="content list_plate_bg">
            	<div class="list_content">
<?php 
                    	foreach($this->list as $v){
		                    $v_title = htmlspecialchars($v['title']);
		                	$v_url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
		                	$v['content'] = strip_tags($v['content']);
		                	$v_intro = mb_cut(($v['content']), 150);
                    		print <<<EOT
                    <dl class="dl_title_txt_list clear_box link_ora_red">
                        <dt><a href="$v_url" title="$v_title" target="_self">$v_title</a></dt>
                        <dd class="dd_txt">$v_intro<a href="$v_url" title="[Detail]" target="_self">【Detail】</a></dd>
                    </dl>
EOT;
}
?>
                    <div class="list_page_box">
                    	<div class="list_page f_r">
<?php
$ext = '&cid=' . $this->cid;
$indexurl =$this->url($this->baseUrl,'', '', 'nowp=1' . $ext);
$lasturl = $this->url($this->baseUrl, '', '', 'nowp=' . $this->page['totalpage'] . $ext);

print <<<EOT
<a href="{$indexurl}" title="1"><i>&lt;&lt;</i>First page</a>
EOT;
foreach ($this->pagenum as $v) {
    $url =$this->url($this->baseUrl, $this->cname, 'list', 'nowp=' . $v . $ext);
    if ($v != $this->page['nowp'])
        echo '<a href="' . $url . '" title="' . $v . '">' . $v . '</a>';
    else
        echo '<span class="selected">' . $v . '</span>';
}
print <<<EOT
<a href="{$lasturl}" title="{$this->page['totalpage']}">Last page<i>&gt;&gt;</i></a>
EOT;
?>
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
            	<div class="clear"></div>
            </div>
            <div class="list_plate_bg main_bot"></div>
        </div>
        <div class="clear"></div>
    </div>
  </div>

</div>
<?php $this->render("footer.php");?>
</body>
</html>